Skip to content

fix: drop unused import #449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025
Merged

fix: drop unused import #449

merged 2 commits into from
Jun 11, 2025

Conversation

sanjayankur31
Copy link
Member

This was somehow causing errors where instead of looking for List in typing, it was looking for List in numpy.typing---pylab must import it somewhere.

For reference, here's the complete traceback:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.12/x64/bin/pynml-modchananalysis", line 5, in <module>
    from pyneuroml.neuron.analysis.HHanalyse import main
  File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/pyneuroml/neuron/analysis/HHanalyse.py", line 141, in <module>
    def get_states(txt: str) -> typing.List[str]:
                                ^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/numpy/typing/__init__.py", line 189, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
AttributeError: module 'numpy.typing' has no attribute 'List'

@pgleeson we can revert/drop 6d4d21c in the experimental branch

This was somehow causing errors where instead of looking for `List` in
`typing`, it was looking for `List` in `numpy.typing`---pylab must
import it somewhere.

For reference, here's the complete traceback:

```
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.12/x64/bin/pynml-modchananalysis", line 5, in <module>
    from pyneuroml.neuron.analysis.HHanalyse import main
  File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/pyneuroml/neuron/analysis/HHanalyse.py", line 141, in <module>
    def get_states(txt: str) -> typing.List[str]:
                                ^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/numpy/typing/__init__.py", line 189, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
AttributeError: module 'numpy.typing' has no attribute 'List'
```
@sanjayankur31 sanjayankur31 requested a review from pgleeson June 11, 2025 10:05
@pgleeson pgleeson merged commit 07dec4f into development Jun 11, 2025
6 checks passed
@sanjayankur31 sanjayankur31 deleted the feat-fix-typing-conflict branch June 11, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants